<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <link href="reset.css" rel="stylesheet">
    <link href="style.css" rel="stylesheet">
    <script>
        //检测登录状态
        var Login = new Promise(function (resolve, reject) {
            var xhr = new XMLHttpRequest();
            xhr.onreadystatechange = function () {
                if (this.readyState == 4) {
                    if (this.status == 200) {
                        var data = JSON.parse('' + this.response);
                        resolve(data);
                        // ...our code here...
                    }
                    else {
                        //todo 链接不畅
                    }
                }

            };
            xhr.open("GET", '/api/user/login', true);
            xhr.send(null);
        });
        Login.isLogin = false;

    </script>
    <script src="//cdn.bootcss.com/plupload/2.1.8/plupload.full.min.js"></script>
</head>
<body id="app" @onresize="resize()">

<div id="message">
    <div v-if="show" transition="message">
        <p>{{content}}</p>
    </div>
</div>
<div id="modal">
    <div v-if="show" transition="modal-shadow"></div>
    <div v-if="show" transition="modal-dialog">
        <p>{{content}}</p>
    </div>
</div>
<component is="SideNav" :is-login.sync="isLogin" :tab.sync="tab"></component>

<component is="banner" :width="width*0.3 - 50" :banner-show.sync="bannerShow"></component>

<router-view :width="width" :banner-show.sync="bannerShow" :is-login.sync="isLogin" :tab.sync="tab"></router-view>

</body>
<script type="text/javascript" src="bundle.js"></script>
</html>